package cn.sciento.onelink.sim.aggregative.group.info;

import cn.sciento.onelink.AppManager;
import cn.sciento.onelink.CommonResponse;
import cn.sciento.onelink.LinkRequest;
import cn.sciento.onelink.utils.TransIdUtil;
import lombok.Data;
import org.apache.http.client.methods.HttpRequestBase;

import java.util.HashMap;
/**
 * 集团群组信息查询
 * @author waltonlee
 */
@Data
public class SimGroupInfoRequest extends LinkRequest<CommonResponse<SimGroupInfoResult>> {
    public static final String PAGESIZE = "10";
    public static final String STARTNUM = "1";
    private String pageSize;
    private String startNum;

    public SimGroupInfoRequest(String pageSize, String startNum) {
        super(Method.GET);
        this.pageSize = pageSize;
        this.startNum = startNum;
    }
    public SimGroupInfoRequest(){
        this(PAGESIZE,STARTNUM);
    }
    public HttpRequestBase generate() {
        this.path = "/ec/query/group-info";
        HashMap<String, Object> bodyMap = new HashMap<String, Object>();
        bodyMap.put("transid", TransIdUtil.generate(AppManager.appId));
        bodyMap.put("token", this.getToken());
        bodyMap.put("pageSize",pageSize);
        bodyMap.put("startNum",startNum);
        this.setCompleteUrl(this.path, bodyMap);
        return httpRequestBase;
    }
}
